import request from '@/utils/request'

export default {
  getCourseList(queryInfo) {
    return request({
      url: `/course/list`,
      method: 'get',
      params: queryInfo
    })
  },
  addCourse(question) {
    return request({
      url: `/course/addCourse`,
      method: 'post',
      data: question
    })
  },
  filePreview(queryInfo) {
    return request({
      url: `/file/preview/${queryInfo.fileName}`,
      method: 'get',
      params: queryInfo
    })
  },
  delete(question) {
    return request({
      url: '/course/del',
      method: 'post',
      data: question
    })
  },


  deleteQuestion(questionIds) {
    return request({
      url: '/teacher/deleteQuestion',
      method: 'get',
      params: questionIds
    })
  },
  addQuestion(question) {
    return request({
      url: '/teacher/addQuestion',
      method: 'post',
      data: question
    })
  },
  updateQuestion(question) {
    return request({
      url: '/teacher/updateQuestion',
      method: 'post',
      data: question
    })
  },
  getQuestionByBankIdAndType(params) {
    return request({
      url: '/public/getQuestionByBankIdAndType',
      method: 'get',
      params: params
    })
  }
}
